package com.shopping_back.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 商品SPU表
 * </p>
 *
 * @author Jack
 * @since 2025-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("spu")
public class Spu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * SPU ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 类目ID
     */
    private Long categoryId;

    /**
     * 商家ID
     */
    private Long merchantId;

    /**
     * 商品标题
     */
    private String title;

    /**
     * 主图URL
     */
    private String mainImage;

    /**
     * 详情HTML
     */
    private String detailHtml;

    /**
     * 状态(0下架 1上架)
     */
    private Integer status;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    @TableField(exist = false)
    private List<Sku> skuList;

}
